package com.hspedu;

/**
 * @author LiuJinTao
 * @className CPUNum
 * @date 2024/06/22 20:59
 * @description TODO
 */
public class CPUNum {
    public static void main(String[] args) {
        Runtime runtime = Runtime.getRuntime();
        // 获取当前电脑的 CPU 数量/核数
        int CPU_nums = runtime.availableProcessors();
        System.out.println("当前 CPU 个数：" + CPU_nums);
    }
}
